# Copyright (c) 2018 Presto Labs Pte. Ltd.
# Author: leon

# wget -O- --header=X-Quoine-API-Version:2 "https://api.quoine.com/products" | python -m json.tool | grep quoted_currency | awk '{print $2}' | sort | uniq | python -c 'import sys; l = sys.stdin.read().replace("\"", "").split(",\n"); import pprint; pprint.pprint([i.upper() for i in l])'
quote_currency_list = [
    'AUD',
    'BTC',
    'CNY',
    'ETH',
    'EUR',
    'HKD',
    'IDR',
    'INR',
    'JPY',
    'PHP',
    'QASH',
    'SGD',
    'USD',
]

# wget -O- --header=X-Quoine-API-Version:2 "https://api.quoine.com/products" | python -m json.tool | grep base_currency | awk '{print $2}' | sort | uniq | python -c 'import sys; l = sys.stdin.read().replace("\"", "").split(",\n"); import pprint; pprint.pprint([i.upper() for i in l])'
base_currency_list = [
    'BCH',
    'BTC',
    'DASH',
    'ETH',
    'NEO',
    'QASH',
    'QTUM',
    'RKT',
    'UBTC',
    'XRP',
]

# wget -O- --header=X-Quoine-API-Version:2 "https://api.quoine.com/products" | python -c 'import sys, json; x = json.load(sys.stdin); l = [e["currency_pair_code"] for e in x]; import pprint; pprint.pprint(sorted(l));'
symbol_list = [
    'BCHJPY',
    'BCHSGD',
    'BCHUSD',
    'BTCAUD',
    'BTCCNY',
    'BTCEUR',
    'BTCHKD',
    'BTCIDR',
    'BTCINR',
    'BTCJPY',
    'BTCPHP',
    'BTCSGD',
    'BTCUSD',
    'DASHEUR',
    'DASHJPY',
    'DASHSGD',
    'DASHUSD',
    'ETHAUD',
    'ETHBTC',
    'ETHCNY',
    'ETHEUR',
    'ETHHKD',
    'ETHIDR',
    'ETHINR',
    'ETHJPY',
    'ETHPHP',
    'ETHSGD',
    'ETHUSD',
    'NEOEUR',
    'NEOJPY',
    'NEOSGD',
    'NEOUSD',
    'QASHAUD',
    'QASHBTC',
    'QASHCNY',
    'QASHETH',
    'QASHEUR',
    'QASHHKD',
    'QASHIDR',
    'QASHINR',
    'QASHJPY',
    'QASHPHP',
    'QASHSGD',
    'QASHUSD',
    'QTUMEUR',
    'QTUMJPY',
    'QTUMSGD',
    'QTUMUSD',
    'RKTAUD',
    'RKTEUR',
    'RKTJPY',
    'RKTSGD',
    'RKTUSD',
    'UBTCBTC',
    'UBTCETH',
    'UBTCJPY',
    'UBTCQASH',
    'UBTCSGD',
    'UBTCUSD',
    'XRPEUR',
    'XRPIDR',
    'XRPJPY',
    'XRPQASH',
    'XRPSGD',
    'XRPUSD'
]

# Map native_symbol to product_id
product_id_dict = {
    'BCHJPY': '41',
    'BCHSGD': '40',
    'BCHUSD': '39',
    'BTCAUD': '13',
    'BTCCNY': '17',
    'BTCEUR': '3',
    'BTCHKD': '9',
    'BTCIDR': '11',
    'BTCINR': '18',
    'BTCJPY': '5',
    'BTCPHP': '15',
    'BTCSGD': '7',
    'BTCUSD': '1',
    'DASHEUR': '45',
    'DASHJPY': '44',
    'DASHSGD': '42',
    'DASHUSD': '43',
    'ETHAUD': '33',
    'ETHBTC': '37',
    'ETHCNY': '35',
    'ETHEUR': '28',
    'ETHHKD': '31',
    'ETHIDR': '32',
    'ETHINR': '36',
    'ETHJPY': '29',
    'ETHPHP': '34',
    'ETHSGD': '30',
    'ETHUSD': '27',
    'NEOEUR': '56',
    'NEOJPY': '54',
    'NEOSGD': '55',
    'NEOUSD': '53',
    'QASHAUD': '60',
    'QASHBTC': '52',
    'QASHCNY': '64',
    'QASHETH': '51',
    'QASHEUR': '58',
    'QASHHKD': '62',
    'QASHIDR': '61',
    'QASHINR': '65',
    'QASHJPY': '50',
    'QASHPHP': '63',
    'QASHSGD': '59',
    'QASHUSD': '57',
    'QTUMEUR': '49',
    'QTUMJPY': '48',
    'QTUMSGD': '46',
    'QTUMUSD': '47',
    'RKTAUD': '103',
    'RKTEUR': '105',
    'RKTJPY': '106',
    'RKTSGD': '102',
    'RKTUSD': '104',
    'UBTCBTC': '74',
    'UBTCETH': '75',
    'UBTCJPY': '72',
    'UBTCQASH': '76',
    'UBTCSGD': '73',
    'UBTCUSD': '71',
    'XRPEUR': '85',
    'XRPIDR': '87',
    'XRPJPY': '83',
    'XRPQASH': '88',
    'XRPSGD': '86',
    'XRPUSD': '84',
}

inv_product_id_dict = dict(zip(product_id_dict.values(), product_id_dict.keys()))

min_order_qty = {
    'BTC': 0.001,
    'ETH': 0.01,
    'BCH': 0.01,
    'DASH': 0.01,
    'QTUM': 0.1,
    'NEO': 0.1,
    'UBTC': 0.01,
    'XRP': 1,
    'RKT': 1,
    'QASH': 1,
}
